package cn.example.viewflipper;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.SeekBar;
import android.widget.TextView;

public class Main2Activity extends AppCompatActivity implements SeekBar.OnSeekBarChangeListener {

    private SeekBar seekBar;
    private TextView textView1;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        seekBar=findViewById(R.id.my_sbar);
        textView1=findViewById(R.id.textView1);
        seekBar.setOnSeekBarChangeListener(this);
    }

    /**
     *
     * @param seekBar
     * @param i 当前数值
     * @param b
     */
    @Override
    public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
        textView1.getText();
    }

    //开始拖动
    @Override
    public void onStartTrackingTouch(SeekBar seekBar) {

    }
    //停止拖动
    @Override
    public void onStopTrackingTouch(SeekBar seekBar) {

    }
}
